package trans.model.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the user_tips table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="user_tips"
 */

public abstract class BaseUserTips  implements Serializable {

	private static final long serialVersionUID = 1L;
	public static String REF = "UserTips";
	public static String PROP_STATUS = "Status";
	public static String PROP_TIP_TYPE = "TipType";
	public static String PROP_ID = "Id";
	public static String PROP_TIP_VALUE = "TipValue";
	public static String PROP_USER_ID = "UserId";


	// constructors
	public BaseUserTips () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseUserTips (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.Integer userId;
	private java.lang.Integer tipType;
	private java.lang.String tipValue;
	private java.lang.Integer status;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="native"
     *  column="id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: user_id
	 */
	public java.lang.Integer getUserId () {
		return userId;
	}

	/**
	 * Set the value related to the column: user_id
	 * @param userId the user_id value
	 */
	public void setUserId (java.lang.Integer userId) {
		this.userId = userId;
	}



	/**
	 * Return the value associated with the column: tip_type
	 */
	public java.lang.Integer getTipType () {
		return tipType;
	}

	/**
	 * Set the value related to the column: tip_type
	 * @param tipType the tip_type value
	 */
	public void setTipType (java.lang.Integer tipType) {
		this.tipType = tipType;
	}



	/**
	 * Return the value associated with the column: tip_value
	 */
	public java.lang.String getTipValue () {
		return tipValue;
	}

	/**
	 * Set the value related to the column: tip_value
	 * @param tipValue the tip_value value
	 */
	public void setTipValue (java.lang.String tipValue) {
		this.tipValue = tipValue;
	}



	/**
	 * Return the value associated with the column: status
	 */
	public java.lang.Integer getStatus () {
		return status;
	}

	/**
	 * Set the value related to the column: status
	 * @param status the status value
	 */
	public void setStatus (java.lang.Integer status) {
		this.status = status;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof trans.model.UserTips)) return false;
		else {
			trans.model.UserTips userTips = (trans.model.UserTips) obj;
			if (null == this.getId() || null == userTips.getId()) return false;
			else return (this.getId().equals(userTips.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}